<template>
    <el-dialog title="分类数据" :visible.sync="visible" v-if="visible">
      <el-tag style="margin: 10px;" v-for="item in categoryList" type="success" :key="item.categoryId">{{item.categoryName}}</el-tag>
      <div slot="footer">
        <el-button type="primary" @click="visible=false">关闭</el-button>
      </div>
    </el-dialog>
</template>

<script>
export default {
  name: 'ArticleCategory',
  data () {
    return {
      visible: false
    }
  },
  props: {
    categoryList: {
      required: true,
      type: Array
    }
  },
  methods: {
    init () {
      this.visible = true
    }
  }
}
</script>

<style scoped>

</style>
